import Taro, { Component } from '@tarojs/taro'
import { Button, View } from '@tarojs/components'
import './index.scss'
import { toCommentGoodsPage } from '@/utils/page_router'

interface IProps {
  info: any
}

export default class Index extends Component<IProps, {}> {
  constructor () {
    super(...arguments)
  }

  static options = {
    addGlobalClass: true
  }

  //  查看商品评论
  toCommentPage({ productInfo }) {
    toCommentGoodsPage(productInfo.id)
  }

  render() {
    const { info } = this.props
    return (<View className='comment-see-more'>
      <Button className='see-more-btn xf-btn xf-btn-round' onClick={this.toCommentPage.bind(this, info)}>查看更多评论</Button>
      {/*<View className='see-more-btn' hoverClass='hover-class--btn' onClick={this.toCommentPage.bind(this, info)}>查看更多评论</View>*/}
    </View>)
  }
}